﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

/// <summary>
/// Summary description for chitiettheloaihoa
/// </summary>
public class chitiettheloaihoa
{
    
	public chitiettheloaihoa()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    DBConnection db = new DBConnection();

    public DataTable danhmuchoa(string maloai)
    {
        string sql = "SELECT Hoa.MaHoa, Hoa.TenHoa, Loaihoa.Tenloai, Loaihoa.Maloai,Hoa.Nguongoc, Hoa.YNghia, Hoa.GiaHoa, Hoa.HinhAnh "+
                       "FROM Hoa INNER JOIN CTLoaihoa ON Hoa.MaHoa = CTLoaihoa.MaHoa INNER JOIN "+
                       "Loaihoa ON CTLoaihoa.MaLoai = Loaihoa.MaLoai "+
                       "WHERE (Loaihoa.MaLoai = @ma) ";
        SqlParameter p1 = new SqlParameter("@ma",maloai);
        return db.Get_data(sql,p1);
    }
}
